<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用单选的表单</title>
    <script type="text/javascript" src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
<body>

<div id="app">
    <form>
        <fieldset>
            <legend>选择你的性别</legend>
            <label>
                <input type="radio" v-model="gender" :value="genders[0]">男
            </label><br/>

            <label>
                <input type="radio" v-model="gender" value="女">女
            </label><br/>

            <label>
                <input type="radio" v-model="gender" value="外侨">外侨
            </label>
        </fieldset>
    </form>
    <div>选择性别：'{{gender}}'</div>
</div>

<script>
    new Vue({
        el: '#app',
        data: {
            genders: ['男', '女', '外侨'],
            gender: undefined
        }
    })
</script>

</body>
</html>